x86 shadow: fix race when domain is dying
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 26 Nov 2009 11:02:30 +0000 (11:02 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 26 Nov 2009 11:02:30 +0000 (11:02 +0000)
commit833cce002f0fbebf87a2a71f195b9447e0ef73e5
treec5e4ea669f1e0d2102b2e4cdc40c5636fb37ec72
parent8978cc08d9353ace405f1a2d65c3fef963432fa6
x86 shadow: fix race when domain is dying

There are some cases that shadow_write_p2m_entry() is called after
the domain is killed. It causes Xen to crash.

- Race between xc_map_foreign_batch from qemu-dm and "xm destroy"
  command.
- The hypervisor calls domain_crash when PoD fails.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/x86/mm/p2m.c
xen/arch/x86/mm/shadow/common.c